module("mapper",package.seeall)
unknownloc="-1"
roomsall={}

croom={}
function croom:new(roomname,roomid)
	o ={}
	setmetatable(o, self)
	self.__index = self
	o.roomname=roomname
	o.roomid=roomid
	o.paths={}
	return o
end

openinifile=function(filename)
	local f=io.input(filename)
	local data={}
	local s
	repeat
		s = f:read ("*l")
		if s then
			newroomfromini(s)
		end
	until not s
	io.close(f)
	return(data)
end
inidatare=rex.new("^(?<id>[^=!]+?)=(?<name>[^\\|]*)\\|(?<paths>(.+:.+,)*)$")
newroomfromini=function(data)
	data=inidata(data)
	local paths
	if data then
		paths=utils.split(data.paths,",")
		for i,v in pairs(paths or {}) do
			inipathdata(data,v)
		end
end
end

inidata=function(data)
	local s,e,t=inidatare:match(data)
	return t
end
inipathdata=function(data,pathstring)
end


otime=os.time()
openinifile("lua\\luamudbot\\mods\\hell\\rooms_all.h")
print(os.time() - otime )
